package com.lion.ball.app.pages.common.login;

import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

import com.lion.ball.app.models.uaa.LoginResult;

/**
 * @author Chris Chan
 * Create on: 2025-09-10 09:15
 * Use for: Login 数据中心
 * Explain:
 */
public class LoginViewModel extends ViewModel {
    // 示例数据
    private MutableLiveData<String> info;
    // 登录结果
    private MutableLiveData<LoginResult> loginResult;

    // 构造方法
    public LoginViewModel() {
        info = new MutableLiveData<>();
        loginResult = new MutableLiveData<>();
        setInfo("测试");
    }

    // 示例数据读取
    public MutableLiveData<String> getInfo() {
        return info;
    }

    // 示例数据赋值
    public void setInfo(String info) {
        this.info.setValue(info);
    }

    public MutableLiveData<LoginResult> getLoginResult() {
        return loginResult;
    }

    public void setLoginResult(LoginResult loginResult) {
        this.loginResult.setValue(loginResult);
    }
}
